package com.zmn.plat.services.impl.orderconfig.distribute;

import java.util.List;

import javax.annotation.Resource;

import com.zmn.plat.common.dto.orderconfig.distribute.RobOrderDIO;
import com.zmn.plat.model.entity.orderconfig.distribute.CheckCityAvailableQuery;
import com.zmn.plat.model.entity.orderconfig.distribute.UpdateStatusQuery;
import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.orderconfig.distribute.DistributeWeightPlat;
import com.zmn.plat.model.entity.orderconfig.distribute.DistributeWeightStatusQuery;
import com.zmn.plat.persistence.interfaces.orderconfig.distribute.DistributeWeightPlatDao;
import com.zmn.plat.services.interfaces.orderconfig.distribute.DistributeWeightPlatService;

/**
 * 类描述：派单参数平台配置业务处理实现
 *
 * @author mujunlin
 * @version v1.0
 * @since 2019/10/17 14:39
 */
@Service
public class DistributeWeightPlatServiceImpl implements DistributeWeightPlatService {

    @Resource
    private DistributeWeightPlatDao distributeWeightPlatDao;

    @Override
    public DistributeWeightPlat findByKey(Integer distributePlatId) {
        return distributeWeightPlatDao.findByKey(distributePlatId);
    }

    @Override
    public List<DistributeWeightPlat> findByPlatAndBizType(Integer plat, Integer bizType, Integer distributeWay) {
        return distributeWeightPlatDao.findByPlatAndBizType(plat, bizType, distributeWay);
    }

    @Override
    public List<DistributeWeightPlat> findByPlatAndBizTypeAndCity(Integer plat, Integer bizType,
                                                                  Integer cityId, Integer distributeWay) {
        return distributeWeightPlatDao.findByPlatAndBizTypeAndCityId(plat, bizType, cityId, distributeWay);
    }

    @Override
    public List<DistributeWeightPlat> listAll() {
        return distributeWeightPlatDao.listAll();
    }

    @Override
    public List<DistributeWeightPlat> listByPlatIdAndBizType(List<Integer> ids, Integer bizType, Integer distributeWay) {
        return distributeWeightPlatDao.listByPlatIdAndBizType(ids, bizType, distributeWay);
    }

    @Override
    public List<DistributeWeightPlat> listCompanyByPlatIdAndType(List<Integer> ids, Integer bizType, Integer distributeWay) {
        return distributeWeightPlatDao.listCompanyByPlatIdAndType(ids, bizType, distributeWay);
    }

    @Override
    public List<Integer> hasBeenSetCity(CheckCityAvailableQuery query) {
        return distributeWeightPlatDao.hasBeenSetCity(query);
    }

    @Override
    public Integer updateByKey(DistributeWeightPlat distributeWeightPlat) {
        return distributeWeightPlatDao.updateByKey(distributeWeightPlat);
    }

    @Override
    public Integer updateStatusByQuery(DistributeWeightStatusQuery query) {
        return distributeWeightPlatDao.updateStatusByQuery(query);
    }

    @Override
    public Integer updateStatus(UpdateStatusQuery updateStatusQuery) {
        return distributeWeightPlatDao.updateStatus(updateStatusQuery);
    }

    @Override
    public Integer insert(DistributeWeightPlat distributeWeightPlat) {
        return distributeWeightPlatDao.insert(distributeWeightPlat);
    }

    @Override
    public Integer deleteByKey(Integer distributePlatId) {
        return distributeWeightPlatDao.deleteByKey(distributePlatId);
    }

    @Override
    public List<DistributeWeightPlat> findPlatDirectlyConfigByQuery(RobOrderDIO robOrderDIO) {
        return distributeWeightPlatDao.findPlatDirectlyConfigByQuery(robOrderDIO);
    }
}
